package me.jessyan.mvparms.demo.mvp.ui.holder;

import android.view.View;
import android.widget.TextView;

import com.jess.arms.base.BaseHolder;

import butterknife.BindView;
import io.reactivex.Observable;
import me.jessyan.mvparms.demo.R;
import me.jessyan.mvparms.demo.data.entity.MessageListEntity;

/**
 * @Author: 海洋
 * @Date: 2018/8/23
 * @Desc:
 */
public class MessageItemHolder extends BaseHolder<MessageListEntity> {


    @BindView(R.id.item_message_list_text_title)
    TextView mMessageListTitle;

    public MessageItemHolder(View itemView) {
        super(itemView);

    }

    @Override
    public void setData(MessageListEntity data, int position) {
        Observable.just(data.getTitle())
                .subscribe(s -> mMessageListTitle.setText(s));
    }

}
